function Tab(tabListName, tabPaneName) {
  const tabList = $(`${tabListName} li`);
  const tabPane = $(`${tabPaneName} li`);
  let preTab = $(`${tabListName} li.on`)[0];
  let prePane = $(`${tabPaneName} li.on`)[0];

  for (let i = 0; i < tabList.length; i++) {
    $(tabList[i]).click(function() {
      preTab.className = "";
      prePane.className = "";
      this.className = "on";
      tabPane[i].className = "on";
      preTab = this;
      prePane = tabPane[i];
    });
  }
}
